home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / SmallEiffel 0.3.3 / SmallEiffel 68k / misc / basic_test next >
Encoding:
Text File  |  1996-06-13  |  3.1 KB  |  129 lines  |  [TEXT/EDIT]

  1. #!/bin/csh
  2. # Some Basic Tests including Kernel Classes
  3. #
  4. # Usage : basic_test [args_for_compile]
  5. #
  6. #set verbose = 1
  7. if (!($?SmallEiffel)) then
  8.     echo "Environment Variable 'SmallEiffel' not set."
  9.     exit 1
  10. endif
  11. set compile=${SmallEiffel}/bin/compile
  12. echo Testing ${compile} $* > /dev/tty
  13. echo Options : $*
  14. ###################################################################
  15. /bin/rm -f ./a.out
  16. ${compile} $* HELLO_WORLD make > /dev/null
  17. ./a.out
  18. ###################################################################
  19. cd ${SmallEiffel}/lib_test
  20. echo -n "Testing ."
  21. foreach t (vide.e test_*.e)
  22. #    echo $t
  23.     ${compile} $* $t make > /dev/null
  24.     if (${status}) then
  25.         echo Error While Compiling ${t}
  26.     else
  27.         echo -n "."
  28.     endif
  29.     if (!(-x ./a.out)) then
  30.         echo No a.out for file ${t}
  31.     else
  32.         echo -n "."
  33.     endif
  34.     ./a.out
  35.     if (${status}) then
  36.         echo Error While Running ${t}
  37.     else
  38.         echo -n "."
  39.         /bin/rm -f ./a.out
  40.     endif
  41. end
  42. cd ${SmallEiffel}/bin
  43. ###################################################################
  44. /bin/rm -f ./a.out
  45. ${compile} -boost BOOST_IS_STATIC make > /dev/null
  46. echo -n "."
  47. ./a.out
  48. echo -n "."
  49. ###################################################################
  50. /bin/rm -f testargs
  51. ${compile} $* -o testargs TESTARGS make > /dev/null
  52. testargs
  53. echo -n "."
  54. testargs 1
  55. echo -n "."
  56. testargs 2 arg2
  57. echo "."
  58. /bin/rm -f testargs
  59. ###################################################################
  60. /bin/rm -f ./a.out
  61. echo "TRY_ANIMAL"
  62. ${compile} $* TRY_ANIMAL make > /dev/null
  63. ./a.out
  64. ###################################################################
  65. /bin/rm -f ./a.out
  66. echo "TRY_PRINT_ON"
  67. ${compile} $* TRY_PRINT_ON make > /dev/null
  68. ./a.out
  69. ###################################################################
  70. echo "Compiling SmallEiffel/lib_show"
  71. cd ${SmallEiffel}/bin
  72. ${compile} $* PYRAMID make > /dev/null
  73. echo -n "."
  74. ${compile} $* PYRAMID2 make > /dev/null
  75. echo -n "."
  76. ${compile} $* SPREAD_ILLNESS make > /dev/null
  77. echo -n "."
  78. /bin/rm -f ./a.out
  79. ################################
  80. cd ${SmallEiffel}/lib_show/parking
  81. ${compile} $* RUN_PARKING make > /dev/null
  82. /bin/rm -f a.out
  83. echo -n "."
  84. ################################
  85. cd ${SmallEiffel}/lib_show/gcd
  86. ${compile} $* TEST_GCD make > /dev/null
  87. echo -n "."
  88. ./a.out
  89. /bin/rm -f ./a.out
  90. echo -n "."
  91. ###################################################################
  92. cd ${SmallEiffel}/lib_show/external
  93. ${compile} $* EXTERNAL_DEMO make src.c > /dev/null
  94. ./a.out >! tmp$$
  95. if ($status) then
  96.    echo "Error in lib_show/external."
  97.    exit 1
  98. endif
  99. /bin/rm -f tmp* src.o ./a.out
  100. echo -n "."
  101. ###################################################################
  102. cd ${SmallEiffel}/lib_show/bench1
  103. foreach b (*_bench1.e)
  104.     /bin/rm -f a.out
  105.     ${compile} $* $b make > /dev/null
  106.     ./a.out > /dev/null
  107.     if ($status) then
  108.        echo "Error in lib_show/${b}.e"
  109.        exit 1
  110.     endif
  111.     echo -n "."
  112.     /bin/rm -f a.out
  113. end
  114. ###################################################################
  115. cd ${SmallEiffel}/lib_show/bench2
  116. foreach b (*_bench2.e)
  117.     /bin/rm -f a.out
  118.     ${compile} $* $b make > /dev/null
  119.     ./a.out > /dev/null
  120.     if ($status) then
  121.        echo "Error in lib_show/${b}.e"
  122.        exit 1
  123.     endif
  124.     echo -n "."
  125.     /bin/rm -f a.out
  126. end
  127. echo " Done."
  128.  
  129.